import React, { Component } from 'react';
import { Provider } from 'react-redux';
import { BrowserRouter, Route } from 'react-router-dom';
import Header from './common/header';
import Home from './pages/home/index';
import Detail from './pages/detail/index';
import store from './store/index';

class App extends Component {
  render() {
    return (
        <Provider store={store}>
            <div>
                <BrowserRouter>
                    <div>
                        <Header/>
                        <Route path='/' exact component={Home} />
                        <Route path='/detail' exact component={Detail} />
                    </div>
                </BrowserRouter>
            </div>
        </Provider>
    );
  }
}

export default App;
